Sets how strong a sprite effect plays on this object, from 0 to 100 percent (100 is the effect as you made it). The percent multiplies the strength of every track, on top of the track’s own way of moving: a pulse still rises and falls as it was made, only less far; 0 shows nothing. Call it from any event, a Step event included: change the number a little each frame (tween_to does it for you) and the effect fades in, reaches full strength and settles down to nothing. It does nothing when effect is not the effect playing on this object.
Works differently on Game Boy - The Game Boy multiplies the strength of every part of the sprite effect by the percent, as the Game Boy Advance does.
Works differently on Game Boy Color - The Game Boy Color multiplies the strength of every part of the sprite effect by the percent, as the Game Boy Advance does.
Works differently on Sega Genesis - The Sega Genesis plays a sprite effect its own way. This version plays the Tint track (the object's colors mixed toward the effect's color, with the effect's timing). A sprite cannot be bent, turned, resized, blocked or faded here, so the Wobble, Distort, Scale, Rotate, Blocks and See-through tracks do not show (the build says which effect has one); use Make a sprite from this effect for those.
On other consoles this differs: see Side by side and How the consoles differ.
sprite_effect_strength(effect, percent)| Name | Type |
|---|---|
effect | overlay |
percent | int |
Nothing.
Sets how strong the sprite effect playing on this object is, from 0 to 100 percent. 100 is the effect as you made it. The percent multiplies the strength of every track, on top of the track's own way of moving: a pulse still rises and falls as you made it, only less far. 0 shows nothing at all.
Call it from any event, a Step event included, and change the number as the game goes: tween a number from 0 to 100 and back to 0 and the effect fades in, reaches full strength and settles down to nothing.
sprite_effect_strength(se_doc_hit, 50);The walker's effect plays at half strength.
percent is kept between 0 and 100. To read the number back, use sprite_effect_strength_get. How fast the Wobble and Distort go is sprite_effect_speed.A game that never calls sprite_effect_strength has none of this in its cartridge.
The number is kept with the effect playing on this object: it is 100 whenever the effect is started, and it goes away when the effect ends. Tint, Wobble, Distort, Blocks and See-through follow it (Blocks and See-through are the screen’s, so the number reaches them through the one screen effect the console has). A Scale or Rotate track goes that part of the way from no change to what its curve says. A game that never calls it has none of this in its cartridge.